package homework;

public class Homework2 {
	public static void main(String[] args) {
		char[] arr = {'a','b','d','e','d','w','u'};
		char find = 'd';
		// 定义一个变量用来保存出现次数
		int count = 0;
		
		for (int i = 0; i < arr.length; i++) {
			if (arr[i] == find) {
				count++;
			}
		}
		
		System.out.println(count);
	}
}
